---
title: ApiInfoController
summary: Publishes build/version metadata for the deployed service.
status: draft
owner: Not determined from source
last_reviewed: 2026-09-17
library: PdfAPI
reference_type: embedded
---

# ApiInfoController

`ApiInfoController` publishes build/version metadata for the deployed service. It is the only controller with no `[RoutePrefix]`, so its route carries no version segment.

| Field | Value |
| --- | --- |
| **Controller** | `ApiInfoController` |
| **Base** | `System.Web.Http.ApiController` |
| **Route prefix** | — (no `[RoutePrefix]`) |
| **Source** | `PdfAPI\Controllers\v1\ApiInfoController.cs` |
| **Controller-level authorization** | None in code |
| **Error handling** | No `try`/`catch` — framework default; response then passes through `ApiResponseHandler`, whose final outer envelope is unknown** ([details](../endpoints.md#error-response-shape)) |
| **Endpoints** | 1 |

---

## GET buildVersion

Returns build metadata for the deployed application by reading the application's physical root path.

| Field | Value |
| --- | --- |
| **HTTP verb** | `GET` |
| **Resolved route** | `buildVersion` |
| **Route composition** | Attribute route: `[Route("buildVersion")]` with no controller `[RoutePrefix]`, so the resolved route remains `buildVersion` |
| **Action** | `GetBuildVersionData()` |
| **Return type** | `IEnumerable<KeyValuePair<string,string>>` (returned bare) |
| **Authorization** | [None in code](../authentication-authorization.md#authorization-enforcement) |
| **Idempotent** | Yes — read-only |
| **Operation** | [OP-GET-BUILD-VERSION](../operations/op-get-build-version.md) |

### Parameters

This endpoint takes no parameters.

### Response

| Field | Value |
| --- | --- |
| **DTO** | — (`IEnumerable<KeyValuePair<string,string>>`) |
| **Media type** | `application/json` |

| Property | Type | Nullable | Purpose |
| --- | --- | --- | --- |
| Key/Value pairs | `string`/`string` | No | Build metadata entries produced by `SAIF.Web.API.Core.BuildInfo.GetBuildInfo` |

### Status codes

| Status | Condition | Body |
| --- | --- | --- |
| `200 OK` | Build info is read successfully | Array of key/value pairs |

### Errors

| Error status | Trigger | Produced by | Body |
| --- | --- | --- | --- |
| `500 Internal Server Error` | No `try`/`catch` around `BuildInfo.GetBuildInfo(Server.MapPath("~"))`* | Framework (uncaught exception, `IncludeErrorDetailPolicy.Always`) | Exception detail |

The `Body` column above describes only the pre-envelope detail produced by the framework.
Every response also passes through the globally registered `ApiResponseHandler` message handler (`SAIF.Web.API` package), which wraps or post-processes the HTTP response for the whole service. That handler's exact outer envelope shape is implemented inside the package and is not visible in this repository — see [Endpoints: Error response shape](../endpoints.md#error-response-shape).

### Business rules

No business rule is identified for this endpoint; it reads build metadata from the file system with no application-level rule applied.

### Authorization

No authorization attribute or programmatic check is present. See [Authentication and authorization](../authentication-authorization.md).

### Side effects and idempotency

| Aspect | Finding |
| --- | --- |
| Records written | None |
| Downstream calls | None identified |
| Files or messages produced | None — reads build metadata from the deployed application's file system |
| Repeat-call behavior | Read-only; safe to repeat |

### Example

```http
GET buildVersion HTTP/1.1
Host: <host>
```

```http
HTTP/1.1 200 OK
Content-Type: application/json

[
  { "Key": "BuildNumber", "Value": "1.0.0" }
]
```

---

## Related documentation
- [API index](../index.md)
- [Overview](../overview.md)
- [Architecture](../architecture.md)
- [Endpoints](../endpoints.md)
- [Authentication and authorization](../authentication-authorization.md)
- [Dependencies](../dependencies.md)
- [Configuration](../configuration.md)
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [Data model](../data-model.md)
- [Operational runbook](../operational-runbook.md)
- [Tech debt](../tech-debt.md)

> **Note:** Statements marked with `*` were inferred from code structure, naming conventions, or
> contextual evidence where direct confirmation was not available in source artifacts. Statements
> marked with `**` could not be confirmed; treat as unknown until verified.

## Sources
- PdfAPI\Controllers\v1\ApiInfoController.cs
